package com.fengye.security.demo.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.servlet.ModelAndView;

/**
 * @Author sky
 * @Email <mailto:fengyexjtu@126.com>
 * @Date 2020/12/28 10:22
 * @Description
 */
@RestControllerAdvice
@Slf4j
public class MyControllerAdvise {
    @ExceptionHandler({Exception.class})
    public String fix(Exception ex){
        ex.printStackTrace();
        return ex.toString();
    }
}
